package main

func findingUsersActiveMinutes(logs [][]int, k int) []int {
	users := make(map[int]map[int]struct{})

	result := make([]int, k)
	for i := 0; i < len(logs); i++ {
		m, ok := users[logs[i][0]]
		if !ok {
			users[logs[i][0]] = make(map[int]struct{})
			users[logs[i][0]][logs[i][1]] = struct{}{}
		} else {
			m[logs[i][1]] = struct{}{}
		}
	}

	for _, m := range users {
		result[len(m)]++
	}

	return result
}
